package persentation.presentStudent;

import java.awt.Color;
import java.awt.Graphics;
import java.awt.Image;

import javax.swing.ImageIcon;
import javax.swing.JPanel;
import javax.swing.JLabel;

import businesslogic.userBl.StudentController;

import java.awt.Font;

public class BottomPanel extends JPanel {
	private static Image PAGE=new ImageIcon("Graphics/studentGraphics/pp.png").getImage();
	private StudentController studentController;
	
	/**
	 * Create the panel.
	 */
	
	public BottomPanel(StudentController studentController) {
		this.studentController=studentController;
		String name = null;
		try {
			name = studentController.getStudentVO().getName();
		} catch (Exception e) {
	
			e.printStackTrace();
			ExceptionHandler.networkException();
		}
		setSize(800,500);
		setLayout(null);
		
		JLabel lblNewLabel = new JLabel("欢迎学生用户：");
		lblNewLabel.setFont(new Font("微软雅黑", Font.PLAIN, 20));
		lblNewLabel.setBounds(434, 33, 197, 35);
		add(lblNewLabel);
		
		JLabel lblNewLabel_1 = new JLabel(name);
		lblNewLabel_1.setFont(new Font("微软雅黑", Font.PLAIN, 20));
		lblNewLabel_1.setBounds(641, 39, 123, 23);
		add(lblNewLabel_1);
	

	}
	
	public void paintComponent(Graphics g){
		g.drawImage(PAGE, 0, 10, null);
	}
}
